package com.ddtj.demo1.component.config;

import com.ddtj.demo1.component.interceptor.TokenInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

//@Configuration
public class JWTInterceptorConfig extends WebMvcConfigurationSupport {
    @Autowired
    TokenInterceptor tokenInterceptor;
    @Override
    protected void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(tokenInterceptor).addPathPatterns("/**").excludePathPatterns("/login/*","/","/loginUser");
    }
}
